<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>上传字幕</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--视口介绍  禁止手机端缩放-->
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<!--引用bootstrap-->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="css/nav.css">
<link rel="stylesheet" href="css/upload.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/build.css">

<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
</head>

<body>
	<div class="head">
		<!--固定导航菜单-->
		<header id="header" class="navbar-fixed-top">
		<div class="topbar visible-md visible-lg ">
			<div class="container ">
				<div class="row">
					<div class="col-md-2 text-center">
						<span class="glyphicon glyphicon-home"></span> <span>**********</span>
					</div>
					<div class="col-md-5 text-center">
						<span class="glyphicon glyphicon-earphone"></span> <span>**************：</span>
					</div>
					<div class="col-md-2 text-center">
						<span>***********</span>
					</div>
					<div class="col-md-3 text-center">
						<a href="/test/register.jsp" class="btn btn-danger btn-sm">免费注册</a>
						<a href="/test/login.jsp" class="btn   btn-success btn-sm">登录</a>
					</div>
				</div>
			</div>
		</div>
		<div class="top-nav">
			<nav class="navbar navbar-default navbar-static-top ">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
						aria-expanded="false">
						<span class="sr-only">切换菜单</span> <span class="icon-bar"></span> <span
							class="icon-bar"></span> <span class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#"><img src="logo.png"></a>
				</div>
				<div class="collapse navbar-collapse"
					id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class="active"><a href="#">网站首页</a></li>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown" role="button" aria-haspopup="true"
							aria-expanded="false">电影字幕 <span class="caret"></span></a>
							<ul class="dropdown-menu">
								<li><a href="#">电影分类1</a></li>
								<li><a href="#">电影分类1</a></li>
								<li><a href="#">电影分类3</a></li>
							</ul></li>
						<li><a href="#">字幕翻译</a></li>
						<li><a href="#">上传字幕</a></li>
						<li><a href="#">交流空间</a></li>
					</ul>
					<ul class="nav navbar-nav navbar-right">
						<li><a href="#">个人中心</a></li>
					</ul>
				</div>
			</div>
			</nav>
		</div>
		</header>
	</div>
	<!--content-------内-----容-->
	<div class="row">
		<div id="content_border">
			<div id="content">
				<div class="col-md-4 hidden-xs hidden-sm">
					<div class="content_left ">
						<div class="user_pic">用户头像</div>
						<div class="user_manger">
							<p id="user_manger_acc">管理账户</p>
							<p id="user_manger_data">账户资料</p>
							<p id="user_manger_message">管理信息</p>
							<p id="user_manger_upload">上传字幕</p>
							<p id="text_translation">字幕翻译</p>
							<p id="text_manger">字幕管理</p>
						</div>
					</div>
				</div>
				<div class="col-md-8">
					<div class="content_right">
						<!-----上------传------字------幕------>
						<form class="form-group" role="form" enctype="multipart/form-data" action="${pageContext.request.contextPath }/servlet/UploadServlet" method="post">
							<div class="form-inline">

								<label for="uploadFile" class="col-sm-3 control-label" style="margin-right:1em">上传字幕</label> 
									<input id="uploadFile" placeholder="Choose File" disabled="disabled" />
								<div class="fileUpload btn btn-primary">
									<span style="color:white;">Upload</span> 							
									<label for="uploadBtn"></label>
									<input id="uploadBtn" type="file" class="upload" name="uploadfile" />	
									
									
									
									
																	
								</div>
								

								<span class="help-block hidden-xs"
									style="margin-left: 3em; font-size: 8px">支持上传文件
									*.srt、*.ass、*.ssa、*.zip、*.rar、*.7z (idx+sub文件请打包上传) 文件大小限制为25M</span>
								<span class="help-block hidden-md  hidden-sm hidden-lg"
									style="margin-left: 3em; font-size: 8px">支持上传文件
									*.srt、*.ass、*.ssa、*.zip、*.rar、*.7z 大小限制为25M</span>
							</div>
							<!-----关-----联------影-------视------->
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label for="text_query" class="col-sm-3 form-label">关联影视</label>
									<input type="text" name="query" id="text_query"
										placeholder="请输入中文/英文/imdb编号" class="form-control"
										style="margin-left:1em">
								</div>
							</div>
							<!-----字-----幕------标------题------>
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label for="text_title_input" class="col-sm-3 control-label">字幕标题</label>
									<input type="text" name="text_title_input"
										id="text_title_input" class="form-control"
										style="width: auto;margin-left:1em">
								</div>
							</div>
							<!----字-----幕------语------言------>

							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label class="col-sm-3 "> 字幕语言 </label>

									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_language" id="simple_chinese"
											value="简体中文" checked="checked" /> <label
											for="simple_chinese"><span>简体中文</span></label>
									</div>

									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_language"
											id="traditional_Chinese" value="繁体中文" /> <label
											for="traditional_Chinese"><span>繁体中文</span></label>
									</div>

									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_language" id="english"
											value="英语" /> <label for="english"><span>英语</span></label>
									</div>

									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_language" id="japanese"
											value="日语" /> <label for="japanese"><span>日语</span></label>
									</div>

									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_language" id="korean"
											value="韩语" /> <label for="korean"><span>韩语</span></label>
									</div>
								</div>
							</div>


							<!----字------幕------格------式-------->
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label class="col-sm-3"> 字幕格式 </label>
									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_type" id="IDX_SUB"
											value="IDX_SUB" checked="checked" /> <label for="IDX+SUB"><span>IDX+SUB</span></label>
									</div>
									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_type" id="SRT" value="SRT" /> <label
											for="SRT"><span>SRT</span></label>
									</div>
									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_type" id="ASS" value="ASS" /> <label
											for="ASS"><span>ASS</span></label>
									</div>
									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_type" id="SUB" value="SUB" /> <label
											for="SUB"><span>SUB</span></label>
									</div>
									<div class="radio radio-info radio-inline ">
										<input type="radio" name="text_type" id="SUP" value="SUP" /> <label
											for="SUP"><span>SUP</span></label>
									</div>
								</div>
							</div>
							<!-------制------作-------人-->
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label for="input_maker" class="col-sm-3 control-label"
										style="margin-left:1em">制作人</label> <input type="text"
										name="input_maker" id="input_maker" placeholder="多个请用英文逗号隔开"
										class=" form-control"
										style=" color: #777;width: auto;margin-left:0">
								</div>
							</div>
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label for="input_checker" class="col-sm-3 control-label"
										style="margin-left:1em">校订人</label> <input type="text"
										name="input_checker" id="input_checker"
										placeholder="多个请用英文逗号隔开" class="form-control"
										style=" color: #777;width: auto;margin-left:0">
								</div>
							</div>
							<!--字----幕-----来-----源-->
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label for="text_way" class="col-sm-3 control-label">字幕来源</label>
									<select name="text_way" class="form-control form-inline"
										id="text_way"
										style="width: auto;background-color:#d43f3a;color:white;margin-left:1em">
										<option id="tran_person" value="个人原创翻译">个人原创翻译</option>
										<option id="meachine_tran" value="平台机器翻译">平台机器翻译</option>
										<option id="zimu_tran" value="字幕组翻译">字幕组翻译</option>
										<option id="official_tran" value="官方译本">官方译本</option>
										<option id="other_tran" value="其他">其他</option>
									</select>
								</div>
							</div>
							<!--备-----注----说-----明-->
							<div class="form-group">
								<div class="form-inline" style="margin-top: 25px">
									<label for="other_says_text" class="col-sm-3">备注说明 </label>
									<textarea id="other_says_text" rows="4" name="other_says_text"
										class="form-control " placeholder="多个请用英文逗号隔开"></textarea>
								</div>
							</div>

							<input type="submit" value="确认发布" class=" btn btn-info"
								name="ture_upload" style="margin-left: 14px" onclick="return check()"/>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--footer---页脚-->
	<footer id="footer"> </footer>
	<script src="bootstrap/js/jquery-3.2.1.min.js"></script>
	<script src="bootstrap/js/bootstrap.js"></script>
	<script src="js/file.js"></script>
	<!-- ChangMQ267 -->
	<script type="text/javascript">  
        function check(){  
            var flag = true;
            var uploadBtn = document.getElementById("uploadBtn").value
            var text_query = document.getElementById("text_query").value;  
            var text_title_input = document.getElementById("text_title_input").value;  
            if ("" == uploadBtn){  
                alert("请选择字幕文件！");   
                flag = false;  
                return false;   
            }else if("" == text_query){
            	alert("请输入相关影视！");
                flag = false;  
                return false;
            }else if ("" == text_title_input){  
                alert("请输入字幕标题！");  
                flag = false;  
                return false;  
                }
            if(flag == true){  
                //form.submit();  
                return true;  
            }  
        }  
    </script>  
</body>
</html>
